/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package submarines;

import java.util.Random;
import java.util.LinkedList;
/**
 *
 * @author Shmiti
 */
public class AdvancedEaPlayer extends MediumEaPlayer{
    
    /**
     * 
     * @param userName
     * @param userScore
     */
    public AdvancedEaPlayer(String userName, int userScore) {
        super(userName, userScore);
    }
    
    @Override
    int[] getNextTargetedCoords(enemyBoard e) {
        int [] coords = new int[2];
        boolean found = false;
        
        int i, j;
        i = 0;
        j = 0;
        
        while ((!found) && (i < Config.BOARD_SIZE)) {
            while ((!found) && (j < Config.BOARD_SIZE)) {
                if (e.canBeTargeted(j, i)) {
                    
                }
            }
        }
        
        Random r = new Random();
        coords[0] = r.nextInt(Config.BOARD_SIZE);
        coords[1] = r.nextInt(Config.BOARD_SIZE);
        
        while ((e.canBeTargeted(coords[0], coords[1])) && (!e.isMarked(coords[0], coords[1]))) {
            coords[0] = r.nextInt(Config.BOARD_SIZE);
            coords[1] = r.nextInt(Config.BOARD_SIZE);
        }
        
        return coords;
    }
    
    int[] FindUnSunkenShip(enemyBoard e) {
        int[] coords = new int[2];
        int i, j;
        
        return coords;
    }
}
